export enum DIMENSION {
  '默认维度' = 'sd',
  '切换维度' = 'ds',
}

export enum DIMENSION96 {
  '默认维度' = 'sdn',
  '切换维度' = 'ns',
}

export const FIRELOW = 394.9;

export const SELECT_DATA: string[] = ['交易单元', '日期', '时点'];

export const SORT = {
  desc: 'desc',
  asc: 'asc',
};

export const indexMap: any = {
  totalStatementQuantity: { name: '综合电量', type: 'bar', color: '#5795CD' },
  totalStatementEnergyPrice: {
    name: '综合电价',
    type: 'line',
    color: '#E6E963',
    props: { symbol: 'circle' },
  },
  _averagePrice: {
    name: '算术均价',
    type: 'dashed',
    color: '#F6925A',
    props: {
      symbol: 'circle',
    },
  },
  // baseQuantity: { name: '基数电量', type: 'bar', color: '#00BF8F', props: { stack: 'one' } },
  // longTermStatementQuantity: {
  //   name: '市场化中长期电量',
  //   type: 'bar',
  //   color: '#BFEBA2',
  //   props: { stack: 'one' },
  // },
  provincialDayaheadClearingQuantity: {
    name: '日前出清电量',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#67B2F7',
  },
  // provincialRealtimeClearingQuantity: {
  //   name: '实时计量电量',
  //   type: 'line',
  //   props: { symbol: 'circle' },
  //   color: '#837ADC',
  // },
  totalLongTermStatementEnergyPrice: {
    name: '中长期综合电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#2BDAE5',
  },
  provincialRealtimePurchasedPrice: {
    name: '实时买入电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#E6E963',
  },
  provincialRealtimeSoldPrice: {
    name: '实时卖出电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#18A0FB',
  },
  provincialDayaheadPurchasedPrice: {
    name: '日前买入电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#F67E26',
  },
  provincialDayaheadSoldPrice: {
    name: '日前卖出电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#30D485',
  },
  //子页面
  kValue: {
    name: '单元自身基数比例',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#F6C826',
  },
  provincialDayaheadStatementPriceaheadStatementPrice: {
    name: '日前结算电价',
    type: 'line',
    color: '#2BDAE5',
    props: { symbol: 'circle' },
  },
  provincialRealtimeStatementPricetimeStatementPrice: {
    name: '实时结算电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#E6E963',
  },
  _transitionPrice: {
    name: '过渡电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#30D485',
  },
};
export const chartsMap = {
  // 场站总览: ['totalStatementQuantity', 'totalStatementEnergyPrice', '_averagePrice'],
  场站总览: ['totalStatementQuantity', 'totalStatementEnergyPrice'],
  电量分析: [
    // 'baseQuantity',
    // 'longTermStatementQuantity',
    'provincialDayaheadClearingQuantity',
    // 'provincialRealtimeClearingQuantity',
  ],
  电价分析: [
    'totalStatementEnergyPrice',
    'totalLongTermStatementEnergyPrice',
    'provincialRealtimePurchasedPrice',
    'provincialRealtimeSoldPrice',
    'provincialDayaheadPurchasedPrice',
    'provincialDayaheadSoldPrice',
  ],
};

//需要展示双Y轴的图表
export const Doubel_yAxis_title = ['场站总览'];

//需要展示双Y轴的serise字段
export const Doubel_yAxis_serise = ['totalStatementEnergyPrice', '_averagePrice'];

export const hljTableHead = [
  // {
  //   field: 'provincialRealtimeClearingQuantity',
  //   name: '实时计量电量',
  //   parentName: '综合统计',
  // },
  {
    field: 'totalStatementEnergyIncome',
    name: '综合电费',
    parentName: '综合统计',
  },
  {
    field: 'totalStatementQuantity',
    name: '综合电量',
    parentName: '综合统计',
  },
  {
    field: 'totalStatementEnergyPrice',
    name: '综合电价',
    parentName: '综合统计',
  },
  {
    field: 'totalLongTermStatementEnergyIncome',
    name: '中长期总电费',
    parentName: '中长期统计',
  },
  {
    field: 'totalLongTermStatementQuantity',
    name: '中长期总结算电量',
    parentName: '中长期统计',
  },
  {
    field: 'totalLongTermStatementEnergyPrice',
    name: '中长期综合电价',
    parentName: '中长期统计',
  },
  // {
  //   field: 'baseQuantity',
  //   name: '基数电量',
  //   parentName: '中长期统计',
  // },
  // {
  //   field: 'longTermStatementQuantity',
  //   name: '市场化中长期电量',
  //   parentName: '中长期统计',
  // },
  // {
  //   field: 'provincialRealtimeBaseQuantityRatio',
  //   name: '基数电量比例',
  //   parentName: '中长期统计',
  // },
  {
    field: 'provincialDayaheadClearingQuantity',
    name: '日前出清电量',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadPurchasedQuantity',
    name: '日前买入电量',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadPurchasedPrice',
    name: '日前买入电价',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadSoldQuantity',
    name: '日前卖出电量',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadSoldPrice',
    name: '日前卖出电价',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadStatementQuantity',
    name: '日前综合结算电量',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadStatementIncome',
    name: '日前综合结算电费',
    parentName: '日前统计',
  },
  {
    field: 'provincialDayaheadStatementPrice',
    name: '日前综合电价',
    parentName: '日前统计',
  },
  // {
  //   field: 'provincialDayaheadBaseQuantityRatio',
  //   name: '基数电量比例(日前)',
  //   parentName: '日前统计',
  // },
  {
    field: 'provincialRealtimeClearedQuantity',
    name: '实时出清电量',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimePurchasedQuantity',
    name: '实时买入电量',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimePurchasedPrice',
    name: '实时买入电价',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimeSoldQuantity',
    name: '实时卖出电量',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimeSoldPrice',
    name: '实时卖出电价',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimeStatementQuantity',
    name: '实时综合结算电量',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimeStatementIncome',
    name: '实时综合结算电费',
    parentName: '实时统计',
  },
  {
    field: 'provincialRealtimeStatementPrice',
    name: '实时综合电价',
    parentName: '实时统计',
  },
  {
    field: 'deviationRecoveryIncome',
    name: '偏差回收电费',
    parentName: '偏差',
  },
  {
    field: 'deviationRecoveryPrice',
    name: '偏差回收电价',
    parentName: '偏差',
  },
  {
    field: 'longTermExcessRecoveryIncome',
    name: '中长期超/缺额回收',
    parentName: '偏差',
  },
  {
    field: 'longTermExcessRecoveryPrice',
    name: '中长期超/缺额回收电价',
    parentName: '偏差',
  },
];

export const hljHeaderMap = hljTableHead.reduce(
  (a: any, b: any) => {
    a[b.parentName + '-' + b.name] = b.field;
    return a;
  },
  //表格未展示字段
  { 装机容量: 'installedCapacity', 标杆电价: 'benchmarkElectricityPrice' },
);

export const OPTION_KEY = {
  交易单元: 'stationName',
  日期: 'date',
  时点: 'timeOrder',
};
